home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 36
/
PC Gamer IT CD 36 2-2.iso
/
VIGDEMO
/
data1.cab
/
Assets
/
scripts
/
medkit.e
< prev
next >
Wrap
Text File
|
1998-09-21
|
2KB
|
517 lines
int Initialize(string type)
{
global real explodeTime = 5.0;
global int gHealth = 20;
Reset("dummy");
return 0;
}
int Reset(string dummy)
{
SetCollidableProperties(thisObject,1,0);
SetStyle(thisObject,2);
SetScale(thisObject,2.0);
wakeupTime = -1.0;
return 0;
}
int Colliders(string dummy)
{
map::iterator ix;
map objInList;
int result;
if (IsAuthoritative(thisObject) == 0)
return 0;
objInList = Collisions(thisObject,0,0,0);
for (ix = begin(objInList) ;ix != end(objInList); ++ix)
{
result = Heal(first(dereference(ix)));
if (result == 1)
{
if (GetGender(first(dereference(ix))) == 0)
PlaySound(thisObject,65);
else
PlaySound(thisObject,64);
Remove(thisObject);
break;
}
}
return 0;
}
int health(string point)
{
gHealth = Str2Int(point);
}
int Heal(int brain)
{
int result;
result = AddObjectTo(brain,thisObject,gHealth);
return result;
}
int TimedEvent(int input)
{
return 0;
}